import React from 'react';
import {
  BrowserRouter as Router,
  Route,
  Redirect,
  Switch,
  Link
} from 'react-router-dom'
// 页面
import Home     from './pages/home/home';
import Map      from './pages/map/map';
import Analysis from './pages/analysis/analysis';
import Car      from './pages/car/car';
import Monitor  from './pages/monitor/monitor';
import Layout   from './component/layout/layout';
// 引入iconfont样式
import './modules/iconfont/iconfont.css';

class App extends React.Component {
  render() {
    return (
       <Router>
        <Switch>
          <Layout>
            <Switch>
              <Route exact path="/" component={Home}/>
              <Route path="/analysis" component={Analysis}/>
              <Route path="/map" component={Map}/>
              <Route path="/car" component={Car}/>
              <Route path="/monitor" component={Monitor}/>
            </Switch>
          </Layout>
        </Switch>
      </Router>
    );
  }
}

export default App;
